/*
  查询机器人状态
 */
const yunji = require('yi-yunji');

module.exports = {
    handler(req, res, next) {
        let doc = req.query;
        yunji.RobotStatus(doc.productId,(e,r)=>{
            let message = '';
            if(r.errcode===0){
                message='机器人状态查询成功';
            }else{
                message='机器人状态查询失败';
            }
            res.reply({code:r.errcode,message:message,data:r.data})
        });
    }
};
